package com.ljh.localmusic.data.remote

import okhttp3.Interceptor
import okhttp3.Request
import okhttp3.Response

/**
 * author：LJH on 2025/9/17 19:09
 * 添加header
 */
class AuthInterceptor: Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val originalRequest: Request = chain.request()
        val requestBuilder: Request.Builder = originalRequest.newBuilder()
            .header(BaseApi.AUTH_KEY, BaseApi.AUTH_VALUE)

        val request: Request = requestBuilder.build()
        val response = chain.proceed(request)
        return response
    }
}